package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.OrdersPageQueryDTO;
import com.sky.entity.Orders;
import org.apache.ibatis.annotations.Mapper;

import java.util.Map;

@Mapper
public interface OrderMapper {

    void insert(Orders order);

    Page<Orders> pageQuery4User(Long userId, Integer status);

    void cancel(Long id);

    Orders getById(Long id);

    Page<Orders> pageQuery(OrdersPageQueryDTO ordersPageQueryDTO);

    Integer countStatus(Integer toBeConfirmed);

    void update(Orders orders);

    Integer countByMap(Map map);

    Double sumByMap(Map map);
}
